class TurntableState {
  var source;
  Map basicInfo = {};
  Map drawConfigure = {};
  Map drawExchangeConfigure = {};
  List bingoRewardConfigure = [];
  List bingoRewardFullConfigure = [];
  Map displayConfigure = {};
  Map awardListInfo = {};
  Map power = {};
  Map remainData = {};
  Map rewardInfo;
  bool isEnable = true;
  bool isDrawing = false;
  int giftNum = 0;
  config(info) {
    basicInfo = info['turntable_basic_info'];
    drawConfigure = info['turntable_draw_configure'];
    drawExchangeConfigure = info['turntable_draw_exchange_configure'];
    displayConfigure = info['turntable_display_configure'];
    List _bingoRewardConfigure = info['turntable_bingo_reward_configure'];
    bingoRewardFullConfigure = _bingoRewardConfigure;
    bingoRewardConfigure = _bingoRewardConfigure
        .where((element) => element['reward_level'] != null)
        .toList();
    // bingoRewardConfigure.sort((a, b) {
    //   String level_a = a['reward_level'];
    //   String level_b = b['reward_level'];
    //   return sort(level_a.substring(0, 1), level_b.substring(0, 1));
    // });
  }

  int sort(String a, String b) {
    // return int.parse(a) > int.parse(b);
    return a.compareTo(b);
  }
}
